import { createStore, applyMiddleware, combineReducers } from "redux"
import { configureStore } from "@reduxjs/toolkit"

import thunk from "redux-thunk"
import counterReducer from "./features/counter/reducer"
import bannerReducer  from "./features/banner/reducer"

const reducer = combineReducers({
  
    mycounter: counterReducer,
    mybanner: bannerReducer
})

// 创建store（ 传入的reducer函数会自动执行）
const store = createStore(reducer, applyMiddleware(thunk))

// 导出
export { store }




